var express = require('express');
var router = new express.Router();
var Mock = require('mockjs')
/*var express=require('./data/express')*/


router.get('/list', function (req, res) {
  var Logistics = Mock.mock({
    'list|5': [{
      name: '@cname',
      'phone': /\d{5,11}/,
      expresscompany: '快递公司' + '@natural(1000,5000)',
      address: '@county(true)',
      number: '@integer(10000)',
      datetime: '@now'
    }]

  })
  res.send(Logistics.list)

})


var Logistics=[];
router.get('/add',function (request,response) {
  console.log(request,response);
  express.unshift(request.query)
  response.send({
    exp:Logistics,
    flag:true
  })
})



module.exports= router;
